<?php
/**
 * Created by PhpStorm.
 * User: marin
 * Date: 2020/4/12
 * Time: 上午11:01
 */
try {

//    $dbh = new PDO('mysql:host=mysql;dbname=marin_test_db;charset=utf8', "root", "root");
//    foreach ($dbh->query("select `id` ,`name` from users_info") as $row){
//        //print_r($row);
//    }

    $cache = new Redis();
    $res = $cache ->connect("192.168.1.5",6378);

//    $cache->set("easy","home");
//  $res = $cache ->connect("172.23.0.5",6379);
    var_dump($res);
    echo $cache ->ping();
}catch (Exception $exception){
    echo $exception->getMessage();
}
catch(PDOException $e) {
    echo $e->getMessage();
    $errorCode = $e->getCode();
}